package com.cqut.forum.service.imp;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.cqut.forum.dao.UserLogDao;
import com.cqut.forum.entity.UserLog;
import com.cqut.forum.service.UserLogService;

/**
 * 用户日志接口实现类
 * @author yangxun
 */
@Component
public class UserLogServcieImp implements UserLogService {
	
	@Resource
	private UserLogDao userLogDao;
	
	@Transactional
	public List<UserLog> getUserLog(Date date) {
		return userLogDao.getUserLog(date);
	}

	@Transactional
	public List<UserLog> getUserLog(int userId) {
		return userLogDao.getUserLog(userId);
	}
	
	@Transactional
	public boolean save(UserLog userLog) {
		userLogDao.save(userLog);
		return true;
	}
	
	
	/**************set and get method**************/

	public UserLogDao getUserLogDao() {
		return userLogDao;
	}
	public void setUserLogDao(UserLogDao userLogDao) {
		this.userLogDao = userLogDao;
	}
}
